package com.brillilab.service.core.space;

import com.brillilab.domain.enums.space.SpaceTypeEnum;
import com.brillilab.domain.po.space.Box;
import com.brillilab.domain.po.space.BoxGrid;
import com.brillilab.domain.vo.space.BoxGridWithReagentType;
import com.brillilab.domain.vo.space.BoxVo;

import java.util.List;

public interface IBoxService {
    /**
     * @return boolean
     * @Description: delete box by reagent and spaceTypeEnum
     * @Params: [spaceId, spaceTypeEnum]
     * @author wuzhiyu
     * @date 2018/11/15 14:22
     */
    boolean delete(Long spaceId, SpaceTypeEnum spaceTypeEnum);

    /**
     * @return boolean
     * @Description: delete box by panelIdList
     * @Params: [idList]
     * @author wuzhiyu
     * @date 2018/11/15 14:23
     */
    boolean deleteByPanelIdList(List<Long> idList);

    /**
     * @return com.brillilab.domain.po.reagent.Box
     * @Description: save box and create boxgrids
     * @Params: [box]
     * @author wuzhiyu
     * @date 2018/11/15 15:51
     */
    Box add(Box box);

    /**
     * @return com.brillilab.domain.po.reagent.Box
     * @Description: get  box by id
     * @Params: [id]
     * @author wuzhiyu
     * @date 2018/11/15 16:16
     */
    Box get(Long id);

    /**
     * @return boolean
     * @Description: delete box by  boxId
     * @Params: [id]
     * @author wuzhiyu
     * @date 2018/11/15 16:19
     */
    boolean delete(Long id);

    boolean updateInfo(Box box);

    List<BoxGrid> getGridList(Long boxId);

    /**
     * @return java.util.List<com.brillilab.domain.po.reagent.BoxGrid>
     * @Description: getBoxGridList by labid and zone
     * @Params: [labId, zone]
     * @author wuzhiyu
     * @date 2018/11/19 13:12
     */
    List<BoxGrid> getBoxGridList(Long labId, Integer zone);

    /**
     * @return java.util.List<com.brillilab.domain.vo.reagent.BoxGridWithReagentType>
     * @Description: getBoxGridWithReagentTypeList  boxGrid.spec >0  不取无分隔试剂盒的格子
     * @Params: [labId, zone]
     * @author wuzhiyu
     * @date 2018/11/19 19:45
     */
    List<BoxGridWithReagentType> getBoxGridWithReagentTypeListSpecGtZero(Long labId, Integer zone, Integer size, Integer index);

    Integer getBoxGridWithReagentTypeListSpecGtZeroCount(Long labId, Integer zone);

    /**
     * @return com.brillilab.domain.po.reagent.BoxGrid
     * @Description: get boxGrid @Params: [gridId]
     * @author wuzhiyu
     * @date 2018/11/20 13:02
     */
    BoxGrid getBoxGrid(Long gridId);

    /**
     * @return java.lang.Integer
     * @Description: TODO
     * @Params: [boxGridIdList]
     * @author wuzhiyu
     * @date 2018/11/20 15:14
     */
    Integer updateBoxGridFill(List<Long> boxGridIdList, Integer state);

    /**
     * @return java.lang.Integer
     * @Description: TODO
     * @Params: [boxId, boxGrid]
     * @author wuzhiyu
     * @date 2018/11/20 19:07
     */
    Integer updateBoxGridPosition(Long boxId, BoxGrid boxGrid);

    /**
     * @return java.util.List<com.brillilab.domain.po.reagent.Box>
     * @Description: TODO
     * @Params: [panelId]
     * @author wuzhiyu
     * @date 2018/11/21 13:14
     */
    List<BoxVo> list(Long panelId);

    /**
     * @return boolean
     * @Description: TODO
     * @Params: [box]
     * @author wuzhiyu
     * @date 2018/11/22 15:04
     */
    boolean updateById(Box box);

    /**
     * @return boolean
     * @Description: TODO
     * @Params: [roomId, name]
     * @author wuzhiyu
     * @date 2019/1/10 15:34
     */

    boolean updateRoomName(Long roomId, String name);

    List<Box> getLabBoxList(Long labId);

    boolean updateGridAndInventoryOwner(Long boxId, Long labMemberId);

    boolean updateBoxAndGridOwnerByPanelId(Long panelId, Long labMemberId);

    List<Box> listByIdList(List<Long> boxIdList);

    boolean updateInfo(Long boxId, Long labMemberId, String remark, String userReagentType);

    List<Long> getLabSingleBoxIdList(Long labId);
}
